/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package actionForms;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author alocubiche
 */
public class SaisieForm extends org.apache.struts.action.ActionForm{
    private String message;
    private String date;
    private String login;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String _login) {
        this.login = _login;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
    
     public SaisieForm()
    {
        super();
    }
    
    @Override
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
        ActionErrors errors = new ActionErrors();
        if(getMessage() == null)
        {
            errors.add("login", new ActionMessage("error.message.required"));
        }
        
        return errors;       
        
    }
    
}
